package com.example.entity;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

/**
 * @author : guorf
 * @version : v1.0
 * @description : TODO
 * @createTime : 2023/5/5 17:31
 */
@Data
public class Authors {

    private Integer id;

    private String firstName;

    private String lastName;

    private String email;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date birthdate;

    @JsonFormat(pattern = "HH:mm:ss")
    @DateTimeFormat(pattern="HH:mm:ss")
    private Date added;

    @Override
    public String toString() {
        return this.id + "," + this.firstName + "," + this.lastName + "," + this.email + "," + this.birthdate + "," + this.added;
    }
}
